package leetcode.code0053;

import leetcode.IDebug;
import leetcode.IDebug58;
import leetcode.helper.HelpDebug;

public abstract class Solution53 implements IDebug, IDebug58 {

	public abstract int maxSubArray(int[] nums);

	@Override
	public void debug1() {
		String str = "[-2,1,-3,4,-1,2,1,-5,4]";
		int e = 6;
		debug(str, e);
	}

	private void debug(String str, int e) {
		int[] nums = HelpDebug.str2array3(str);
		int r = this.maxSubArray(nums);
		HelpDebug.compare(e, r);

	}

	@Override
	public void debug2() {
		String str = "[1]";
		int e = 1;
		debug(str, e);
	}

	@Override
	public void debug3() {
		String str = "[0]";
		int e = 0;
		debug(str, e);
	}

	@Override
	public void debug4() {
		String str = "[-1]";
		int e = -1;
		debug(str, e);
	}

	@Override
	public void debug5() {
		String str = "[-100000]";
		int e = -100000;
		debug(str, e);
	}

	@Override
	public void debug6() {
		String str = "[5,4,-1,7,8]";
		int e = 23;
		debug(str, e);
	}

	@Override
	public void debug7() {
		String str = "[-2,1]";
		int e = 1;
		debug(str, e);
	}

	@Override
	public void debug8() {
		// TODO Auto-generated method stub

	}

}
